import {
	createStore
} from "vuex";
import qi_cart from './modules/cart.js'
export default createStore({
	state: {
		token:  JSON.parse(uni.getStorageSync('token') || '[]'),
		name: 'xxx',
		uid: "27777"
	},
	mutations: {
		userInfo(state, token) {
			console.log(111,token);
			state.token = token
			this.commit('setToken', token)
		},
		setToken(state){
			uni.setStorageSync('token', JSON.stringify(state.token))
		}
	},
	actions: {
		
	},
	getters: {
		
	},
	modules: {
		qi_cart
	}
});